package com.jy.api.misc.dto;

import com.alibaba.fastjson.annotation.JSONField;
import com.alibaba.fastjson.serializer.ToStringSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * @author yuyue
 */
@Data
public class ShuJuFLDto {

    @JSONField(serializeUsing = ToStringSerializer.class)
    private Long id;

    @ApiModelProperty("字段的ID")
    @NotBlank(message = "id不能为空！")
    private String ziDuanId;

    @ApiModelProperty("名称")
    @NotBlank(message = "名称不能为空！")
    private String mingCheng;

    @ApiModelProperty("描述")
    private String miaoShu;

    @ApiModelProperty("状态，0: 停用， 1: 启用")
    @NotNull(message = "状态不能为空！")
    private Integer status;

    @ApiModelProperty("分类方式， jsonArray格式，保存至数据库中")
    private String fenLeiFS;

    @ApiModelProperty("分类方式，新增时前端填充，获取详情时，后端填充")
    @NotEmpty(message = "分类方式不能为空")
    private List<FenLeiFSDto> fenLeiFSDtoList;

}
